#ifndef __LOGIC_H__
#define __LOGIC_H__
#include "request.h"
/* no free in this function for req 
* actually no free on req is in all
* follow functions
*/
void get_error_html(struct request *req);
/* return BS_OK | BS_ERROR */
int user_check(struct request *req);

/* return:  BS_OK | BS_ERROR
*	input:  struct request *req;
*	note:	may modify req->erroraccur
*
*			req has to allocate before this call
*			and not freed in this func
*
*			make sure the req->url is not 0
*				and req->method is "GET"
*/
int get_html(struct request *req, const char *path);

#endif //__LOGIC_H__